//注意var/let/const的区别,在这里用哪个都可以的时候尽量选择后两个,它们约束了变量提升
// 实例化vue对象1
const v1 = new Vue({
    el: "#vue-app1",
    data: {
        title: "app1的内容",
    },
    methods: {},
    computed: {
        greet: function () {
            return "Hello App1";
        }
    }
});

// 实例化vue对象2
const v2 = new Vue({
    el: "#vue-app2",
    data: {
        title: "app2的内容",
    },
    methods: {
        changeTitle1: function () {
            v1.title = "app1的title改变了";
        }
    },
    computed: {
        greet: function () {
            return "Hello App2";
        }
    }
});

v2.title = "app2的titile在js文件导入时就被改变了";